Optimal. Leaf size=143 \[ -\frac{a \cos ^9(c+d x)}{9 d}+\frac{2 a \cos ^7(c+d x)}{7 d}-\frac{a \cos ^5(c+d x)}{5 d}-\frac{a \sin ^3(c+d x) \cos ^5(c+d x)}{8 d}-\frac{a \sin (c+d x) \cos ^5(c+d x)}{16 d}+\frac{a \sin (c+d x) \cos ^3(c+d x)}{64 d}+\frac{3 a \sin (c+d x) \cos (c+d x)}{128 d}+\frac{3 a x}{128} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.169091, antiderivative size = 143, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 6, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {2838, 2568, 2635, 8, 2565, 270} \[ -\frac{a \cos ^9(c+d x)}{9 d}+\frac{2 a \cos ^7(c+d x)}{7 d}-\frac{a \cos ^5(c+d x)}{5 d}-\frac{a \sin ^3(c+d x) \cos ^5(c+d x)}{8 d}-\frac{a \sin (c+d x) \cos ^5(c+d x)}{16 d}+\frac{a \sin (c+d x) \cos ^3(c+d x)}{64 d}+\frac{3 a \sin (c+d x) \cos (c+d x)}{128 d}+\frac{3 a x}{128} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2838
Rule 2568
Rule 2635
Rule 8
Rule 2565
Rule 270
Rubi steps
\begin{align*} \int \cos ^4(c+d x) \sin ^4(c+d x) (a+a \sin (c+d x)) \, dx &=a \int \cos ^4(c+d x) \sin ^4(c+d x) \, dx+a \int \cos ^4(c+d x) \sin ^5(c+d x) \, dx\\ &=-\frac{a \cos ^5(c+d x) \sin ^3(c+d x)}{8 d}+\frac{1}{8} (3 a) \int \cos ^4(c+d x) \sin ^2(c+d x) \, dx-\frac{a \operatorname{Subst}\left (\int x^4 \left (1-x^2\right )^2 \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac{a \cos ^5(c+d x) \sin (c+d x)}{16 d}-\frac{a \cos ^5(c+d x) \sin ^3(c+d x)}{8 d}+\frac{1}{16} a \int \cos ^4(c+d x) \, dx-\frac{a \operatorname{Subst}\left (\int \left (x^4-2 x^6+x^8\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac{a \cos ^5(c+d x)}{5 d}+\frac{2 a \cos ^7(c+d x)}{7 d}-\frac{a \cos ^9(c+d x)}{9 d}+\frac{a \cos ^3(c+d x) \sin (c+d x)}{64 d}-\frac{a \cos ^5(c+d x) \sin (c+d x)}{16 d}-\frac{a \cos ^5(c+d x) \sin ^3(c+d x)}{8 d}+\frac{1}{64} (3 a) \int \cos ^2(c+d x) \, dx\\ &=-\frac{a \cos ^5(c+d x)}{5 d}+\frac{2 a \cos ^7(c+d x)}{7 d}-\frac{a \cos ^9(c+d x)}{9 d}+\frac{3 a \cos (c+d x) \sin (c+d x)}{128 d}+\frac{a \cos ^3(c+d x) \sin (c+d x)}{64 d}-\frac{a \cos ^5(c+d x) \sin (c+d x)}{16 d}-\frac{a \cos ^5(c+d x) \sin ^3(c+d x)}{8 d}+\frac{1}{128} (3 a) \int 1 \, dx\\ &=\frac{3 a x}{128}-\frac{a \cos ^5(c+d x)}{5 d}+\frac{2 a \cos ^7(c+d x)}{7 d}-\frac{a \cos ^9(c+d x)}{9 d}+\frac{3 a \cos (c+d x) \sin (c+d x)}{128 d}+\frac{a \cos ^3(c+d x) \sin (c+d x)}{64 d}-\frac{a \cos ^5(c+d x) \sin (c+d x)}{16 d}-\frac{a \cos ^5(c+d x) \sin ^3(c+d x)}{8 d}\\ \end{align*}
Mathematica [A] time = 0.273619, size = 84, normalized size = 0.59 \[ \frac{a (-2520 \sin (4 (c+d x))+315 \sin (8 (c+d x))-7560 \cos (c+d x)-1680 \cos (3 (c+d x))+1008 \cos (5 (c+d x))+180 \cos (7 (c+d x))-140 \cos (9 (c+d x))+7560 c+7560 d x)}{322560 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.034, size = 124, normalized size = 0.9 \begin{align*}{\frac{1}{d} \left ( a \left ( -{\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{4} \left ( \cos \left ( dx+c \right ) \right ) ^{5}}{9}}-{\frac{4\, \left ( \sin \left ( dx+c \right ) \right ) ^{2} \left ( \cos \left ( dx+c \right ) \right ) ^{5}}{63}}-{\frac{8\, \left ( \cos \left ( dx+c \right ) \right ) ^{5}}{315}} \right ) +a \left ( -{\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{3} \left ( \cos \left ( dx+c \right ) \right ) ^{5}}{8}}-{\frac{\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{5}}{16}}+{\frac{\sin \left ( dx+c \right ) }{64} \left ( \left ( \cos \left ( dx+c \right ) \right ) ^{3}+{\frac{3\,\cos \left ( dx+c \right ) }{2}} \right ) }+{\frac{3\,dx}{128}}+{\frac{3\,c}{128}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.01538, size = 96, normalized size = 0.67 \begin{align*} -\frac{1024 \,{\left (35 \, \cos \left (d x + c\right )^{9} - 90 \, \cos \left (d x + c\right )^{7} + 63 \, \cos \left (d x + c\right )^{5}\right )} a - 315 \,{\left (24 \, d x + 24 \, c + \sin \left (8 \, d x + 8 \, c\right ) - 8 \, \sin \left (4 \, d x + 4 \, c\right )\right )} a}{322560 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.50918, size = 270, normalized size = 1.89 \begin{align*} -\frac{4480 \, a \cos \left (d x + c\right )^{9} - 11520 \, a \cos \left (d x + c\right )^{7} + 8064 \, a \cos \left (d x + c\right )^{5} - 945 \, a d x - 315 \,{\left (16 \, a \cos \left (d x + c\right )^{7} - 24 \, a \cos \left (d x + c\right )^{5} + 2 \, a \cos \left (d x + c\right )^{3} + 3 \, a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{40320 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 23.5876, size = 272, normalized size = 1.9 \begin{align*} \begin{cases} \frac{3 a x \sin ^{8}{\left (c + d x \right )}}{128} + \frac{3 a x \sin ^{6}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{32} + \frac{9 a x \sin ^{4}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{64} + \frac{3 a x \sin ^{2}{\left (c + d x \right )} \cos ^{6}{\left (c + d x \right )}}{32} + \frac{3 a x \cos ^{8}{\left (c + d x \right )}}{128} + \frac{3 a \sin ^{7}{\left (c + d x \right )} \cos{\left (c + d x \right )}}{128 d} + \frac{11 a \sin ^{5}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{128 d} - \frac{a \sin ^{4}{\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{5 d} - \frac{11 a \sin ^{3}{\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{128 d} - \frac{4 a \sin ^{2}{\left (c + d x \right )} \cos ^{7}{\left (c + d x \right )}}{35 d} - \frac{3 a \sin{\left (c + d x \right )} \cos ^{7}{\left (c + d x \right )}}{128 d} - \frac{8 a \cos ^{9}{\left (c + d x \right )}}{315 d} & \text{for}\: d \neq 0 \\x \left (a \sin{\left (c \right )} + a\right ) \sin ^{4}{\left (c \right )} \cos ^{4}{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.37223, size = 144, normalized size = 1.01 \begin{align*} \frac{3}{128} \, a x - \frac{a \cos \left (9 \, d x + 9 \, c\right )}{2304 \, d} + \frac{a \cos \left (7 \, d x + 7 \, c\right )}{1792 \, d} + \frac{a \cos \left (5 \, d x + 5 \, c\right )}{320 \, d} - \frac{a \cos \left (3 \, d x + 3 \, c\right )}{192 \, d} - \frac{3 \, a \cos \left (d x + c\right )}{128 \, d} + \frac{a \sin \left (8 \, d x + 8 \, c\right )}{1024 \, d} - \frac{a \sin \left (4 \, d x + 4 \, c\right )}{128 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]